// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'Id',
        footer: "Foots",
        cnName: '工作站',
        name: 'Workstation',
        url: "/Workstation/",
        sortName: "Id"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"WorkCode":"","WorkStationName":"","WorkAddress":"","CarName":"","Process":"","Status":"","WorkDesc":"","AutoGenerate":true,"WorkImage":[]};
    const editFormOptions = [
      [
        {"title":"工作站编号","required":true,"field":"WorkCode","type":"text","placeholder":"请输入工作站编号"},
        {"title":"自动生成","required":false,"field":"AutoGenerate","type":"switch"}
      ],
      [{"title":"工作站名称","required":true,"field":"WorkStationName","type":"text","placeholder":"请输入工作站名称"}],
      [{"title":"工作站地点","required":false,"field":"WorkAddress","type":"text","placeholder":"请输入工作站地点"}],
      [{"dataKey":"所在车间","data":[],"title":"所在车间","required":true,"field":"CarName","type":"select","placeholder":"请选择所在车间"}],
      [
        {"dataKey":"所属工序","data":[],"title":"所属工序","required":true,"field":"Process","type":"select","placeholder":"请选择所属工序"},
        {"dataKey":"状态01","data":[],"title":"是否启用","required":true,"field":"Status","type":"radio",
         validator: (rule, val) => {
           if (val === '' || val === undefined || val === null) {
             return '请选择是否启用';
           }
         }
        }
      ],
      [{"title":"备注","required":false,"field":"WorkDesc","type":"textarea","placeholder":"请输入备注"}]
    ];
    const searchFormFields = {"WorkCode":"","WorkStationName":"","CarName":"","Process":""};
    const searchFormOptions = [[{"title":"工作站编号","field":"WorkCode","type":"like"},{"title":"工作站名称","field":"WorkStationName","type":"like"},{"dataKey":"所在车间","data":[],"title":"所在车间名称","field":"CarName","type":"select"},{"dataKey":"所属工序","data":[],"title":"所属工序","field":"Process","type":"select"}]];
    const columns = [{field:'Id',title:'主键',type:'int',width:110,require:true,align:'left'},
                       {field:'WorkCode',title:'工作站编号',type:'string',width:110,require:true,align:'left'},
                       {field:'WorkStationName',title:'工作站名称',type:'string',width:110,require:true,align:'left'},
                       {field:'WorkAddress',title:'工作站地点',type:'string',width:110,require:true,align:'left'},
                       {field:'CarName',title:'所在车间名称',type:'string',bind:{ key:'所在车间',data:[]},width:110,require:true,align:'left'},
                       {field:'Process',title:'所属工序',type:'string',bind:{ key:'所属工序',data:[]},width:110,require:true,align:'left'},
                       {field:'Status',title:'状态',type:'int',bind:{ key:'状态01',data:[]},width:110,align:'left'},
                       {field:'WorkDesc',title:'备注',type:'string',width:110,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}